<%--
  Created by IntelliJ IDEA.
  User: Peter Zhou
 
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加电影表单</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../css/bootstrap.min.css">
<%--    <script src="../js/bootstrap.bundle.js"></script>--%>
<%--    <script src="../js/jquery.min.js"></script>--%>
<%--    <script src="../js/jquery.validate.min.js"></script>--%>
<%--    <script src="../js/messages_zh.js"></script>--%>
    <%
        //项目根路径
        String projectPath = request.getContextPath();
        System.out.println(projectPath);
        ///cenima_buy_ticket_Web_exploded
//获得url根路径
        String urlPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + projectPath;
        System.out.println(urlPath);
        //http://localhost:8080/cenima_buy_ticket_Web_exploded
//获得项目相对路径的真实路径(out下)C:\Users\Administrator\Downloads\cenima-buy-ticket-whw\out\artifacts\cenima_buy_ticket_Web_exploded\img
        String webPath = application.getRealPath("img");
        System.out.println(webPath);
    %>
</head>

<body>
<div class="container-fluid mt-3 d-flex ">
    <div class="m-auto  w-25 card   d-flex  bg-light">

        <div class="card-img m-auto d-flex"><img class="m-auto img-thumbnail " src="../img/ui/movie.png" width="50px" height="50px"></div>
        <div class="card-title m-auto d-flex ">电影添加</div>
        <div class="card-footer m-auto ">
            <form id="addProductForm" method="post" class="m-auto" action="add_movie" enctype="multipart/form-data">
                <div>
                    <label class="d-flex">电影名:</label>
                    <input type="text"  id="movieName" name="movieName">
                </div>
                <div>
                    <label class="d-flex">总时长:</label>
                    <input type="text"  id="totalTime" name="totalTime">
                </div>
                <div>
                    <label class="d-flex">主演:</label>
                    <input type="text"  id="mainActor" name="mainActor">
                </div>
                <div>
                    <label class="d-flex">图片:</label>
                    <input type="file" id="img" name="img">
                </div>
                <div>
                    <label class="d-flex">建议价格:</label>
                    <input type="text"  id="price" name="price">
                </div>
                <div>
                    <label class="d-flex">电影类别:</label>
                    <input type="text" id="type" name="type">
                </div>
                <div>
                    <label class="d-flex">详细介绍:</label>
                    <input type="text" id="detail" name="detail">
                </div>
                <div>
                <label class="d-flex">上映时间:</label>
                <input type="date" id="date" name="date">
                </div>
                <div class="mt-3">
                    <button class="btn btn-primary" type="submit" >立刻上传</button>
                    <a class="btn btn-secondary" href="aindex.jsp.jsp">返回首页</a>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
